package cn.shanke.datax.hook;

import com.alibaba.datax.common.spi.Hook;
import com.alibaba.datax.common.util.Configuration;

import java.util.Map;

public class FirstHook implements Hook {
    @Override
    public String getName() {
        return "first hook";
    }

    @Override
    public void invoke(Configuration configuration, Map<String, Number> map) {
        System.out.println("Hook Job Id:" + configuration.get("core.container.job.id"));
        System.out.println("Hook map:");
        map.keySet().stream().forEach(key -> System.out.println(key + ": " + map.get(key)));
    }
}
